; OWB Font Downloader

failat 21

echo "Welcome to OWB Font Downloader!"

cd datas

requestchoice >env:OWBch "OWB Font Downloader" "Do you want to download and install fonts? Approx 4 MB of font*Narchives will be downloaded.*N*NInstalling fonts will result in copying new font files to SYS:Fonts/TrueType" "Yes" "No"
if ${OWBch} eq "1"
	unsetenv OWBch
	
	if not exists c:xadUnFile
		requestchoice >nil: "OWB Font Downloader" "Couldn't locate xadUnFile command." "Ok"
		quit 5
	else
		echo "Deleting old fonts..."
		delete #?.exe
		delete fonts/#?
		
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/andale32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/arial32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/arialb32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/comic32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/courie32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/georgi32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/impact32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/times32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/trebuc32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/verdan32.exe
	    
	    wget --tries 10 --waitretry 10 http://www.icarosdesktop.com/icarosfiles/msfonts/webdin32.exe
	    
	    echo "Fetched all fonts. Now unpacking"

	    c:xadUnFile andale32.exe  fonts file=#?.TTF
	    
	    c:xadUnFile arial32.exe   fonts file=#?.TTF
	    
	    c:xadUnFile arialb32.exe  fonts file=#?.TTF
	    
	    c:xadUnFile comic32.exe   fonts file=#?.TTF
	    
	    c:xadUnFile courie32.exe  fonts file=#?.TTF
	    
	    c:xadUnFile georgi32.exe  fonts file=#?.TTF
	    
	    c:xadUnFile impact32.exe  fonts file=#?.TTF
	    
	    c:xadUnFile times32.exe   fonts file=#?.TTF
	    
	    c:xadUnFile trebuc32.exe  fonts file=#?.TTF
	    
	    c:xadUnFile verdan32.exe  fonts file=#?.TTF
	    
	    c:xadUnFile webdin32.exe  fonts file=#?.TTF
	    
	    echo "All fonts successfully unpacked."
		echo "Copying in progress..."

	    copy fonts/ sys:fonts/TrueType ALL

		delete #?.exe ALL
		delete fonts ALL

	endif

	echo "Download and installation of all fonts complete."
endif
unsetenv OWBch

